using System;
using System.Text;

namespace iBeauty.BusinessObjects
{
	[Serializable()]
	public class Preference
	{
		private string _ID;

		public string ID
		{
			get { return _ID; }
			set { _ID = value; }
		}

		private DateTime? _CreateDate;

		public DateTime? CreateDate
		{
			get { return _CreateDate; }
			set { _CreateDate = value; }
		}

		private DateTime? _ModifiedDate;

		public DateTime? ModifiedDate
		{
			get { return _ModifiedDate; }
			set { _ModifiedDate = value; }
		}

		private DateTime? _TimeStamp;

		public DateTime? TimeStamp
		{
			get { return _TimeStamp; }
			set { _TimeStamp = value; }
		}

		private string _TerminalID;

		public string TerminalID
		{
			get { return _TerminalID; }
			set { _TerminalID = value; }
		}

		private string _CompanyName;

		public string CompanyName
		{
			get { return _CompanyName; }
			set { _CompanyName = value; }
		}

		private string _ShopCode;

		public string ShopCode
		{
			get { return _ShopCode; }
			set { _ShopCode = value; }
		}

		private string _ShopName;

		public string ShopName
		{
			get { return _ShopName; }
			set { _ShopName = value; }
		}

		private string _Address;

		public string Address
		{
			get { return _Address; }
			set { _Address = value; }
		}

		private string _Phone;

		public string Phone
		{
			get { return _Phone; }
			set { _Phone = value; }
		}

		private string _Fax;

		public string Fax
		{
			get { return _Fax; }
			set { _Fax = value; }
		}

		private string _Email;

		public string Email
		{
			get { return _Email; }
			set { _Email = value; }
		}

		private string _Website;

		public string Website
		{
			get { return _Website; }
			set { _Website = value; }
		}

		private Byte[] _Logo;

		public Byte[] Logo
		{
			get { return _Logo; }
			set { _Logo = value; }
		}

		private DateTime? _StartDate;

		public DateTime? StartDate
		{
			get { return _StartDate; }
			set { _StartDate = value; }
		}

		private DateTime? _EndDate;

		public DateTime? EndDate
		{
			get { return _EndDate; }
			set { _EndDate = value; }
		}

		private Double? _TaxRateIn;

		public Double? TaxRateIn
		{
			get { return _TaxRateIn; }
			set { _TaxRateIn = value; }
		}

		private string _RoundTypeIn;

		public string RoundTypeIn
		{
			get { return _RoundTypeIn; }
			set { _RoundTypeIn = value; }
		}

		private Double? _TaxRateOut;

		public Double? TaxRateOut
		{
			get { return _TaxRateOut; }
			set { _TaxRateOut = value; }
		}

		private string _RoundTypeOut;

		public string RoundTypeOut
		{
			get { return _RoundTypeOut; }
			set { _RoundTypeOut = value; }
		}

		private Double? _ExchangeRate;

		public Double? ExchangeRate
		{
			get { return _ExchangeRate; }
			set { _ExchangeRate = value; }
		}

		private int? _AccountId;

		public int? AccountId
		{
			get { return _AccountId; }
			set { _AccountId = value; }
		}

		public Preference()
		{ }

		public Preference(string ID,DateTime? CreateDate,DateTime? ModifiedDate,DateTime? TimeStamp,string TerminalID,string CompanyName,string ShopCode,string ShopName,string Address,string Phone,string Fax,string Email,string Website,Byte[] Logo,DateTime? StartDate,DateTime? EndDate,Double? TaxRateIn,string RoundTypeIn,Double? TaxRateOut,string RoundTypeOut,Double? ExchangeRate,int? AccountId)
		{
			this.ID = ID;
			this.CreateDate = CreateDate;
			this.ModifiedDate = ModifiedDate;
			this.TimeStamp = TimeStamp;
			this.TerminalID = TerminalID;
			this.CompanyName = CompanyName;
			this.ShopCode = ShopCode;
			this.ShopName = ShopName;
			this.Address = Address;
			this.Phone = Phone;
			this.Fax = Fax;
			this.Email = Email;
			this.Website = Website;
			this.Logo = Logo;
			this.StartDate = StartDate;
			this.EndDate = EndDate;
			this.TaxRateIn = TaxRateIn;
			this.RoundTypeIn = RoundTypeIn;
			this.TaxRateOut = TaxRateOut;
			this.RoundTypeOut = RoundTypeOut;
			this.ExchangeRate = ExchangeRate;
			this.AccountId = AccountId;
		}

		public override string ToString()
		{
			return "ID = " + ID + ",CreateDate = " + CreateDate.ToString() + ",ModifiedDate = " + ModifiedDate.ToString() + ",TimeStamp = " + TimeStamp.ToString() + ",TerminalID = " + TerminalID + ",CompanyName = " + CompanyName + ",ShopCode = " + ShopCode + ",ShopName = " + ShopName + ",Address = " + Address + ",Phone = " + Phone + ",Fax = " + Fax + ",Email = " + Email + ",Website = " + Website + ",Logo = " + Logo.ToString() + ",StartDate = " + StartDate.ToString() + ",EndDate = " + EndDate.ToString() + ",TaxRateIn = " + TaxRateIn.ToString() + ",RoundTypeIn = " + RoundTypeIn + ",TaxRateOut = " + TaxRateOut.ToString() + ",RoundTypeOut = " + RoundTypeOut + ",ExchangeRate = " + ExchangeRate.ToString() + ",AccountId = " + AccountId.ToString();
		}

		public class IDComparer : System.Collections.Generic.IComparer<Preference>
		{
			public SorterMode SorterMode;
			public IDComparer()
			{ }
			public IDComparer(SorterMode SorterMode)
			{
				this.SorterMode = SorterMode;
			}
			#region IComparer<Preference> Membres
			int System.Collections.Generic.IComparer<Preference>.Compare(Preference x, Preference y)
			{
				if (SorterMode == SorterMode.Ascending)
				{
					return y.ID.CompareTo(x.ID);
				}
				else
				{
					return x.ID.CompareTo(y.ID);
				}
			}
			#endregion
		}
		public class TerminalIDComparer : System.Collections.Generic.IComparer<Preference>
		{
			public SorterMode SorterMode;
			public TerminalIDComparer()
			{ }
			public TerminalIDComparer(SorterMode SorterMode)
			{
				this.SorterMode = SorterMode;
			}
			#region IComparer<Preference> Membres
			int System.Collections.Generic.IComparer<Preference>.Compare(Preference x, Preference y)
			{
				if (SorterMode == SorterMode.Ascending)
				{
					return y.TerminalID.CompareTo(x.TerminalID);
				}
				else
				{
					return x.TerminalID.CompareTo(y.TerminalID);
				}
			}
			#endregion
		}
		public class CompanyNameComparer : System.Collections.Generic.IComparer<Preference>
		{
			public SorterMode SorterMode;
			public CompanyNameComparer()
			{ }
			public CompanyNameComparer(SorterMode SorterMode)
			{
				this.SorterMode = SorterMode;
			}
			#region IComparer<Preference> Membres
			int System.Collections.Generic.IComparer<Preference>.Compare(Preference x, Preference y)
			{
				if (SorterMode == SorterMode.Ascending)
				{
					return y.CompanyName.CompareTo(x.CompanyName);
				}
				else
				{
					return x.CompanyName.CompareTo(y.CompanyName);
				}
			}
			#endregion
		}
		public class ShopCodeComparer : System.Collections.Generic.IComparer<Preference>
		{
			public SorterMode SorterMode;
			public ShopCodeComparer()
			{ }
			public ShopCodeComparer(SorterMode SorterMode)
			{
				this.SorterMode = SorterMode;
			}
			#region IComparer<Preference> Membres
			int System.Collections.Generic.IComparer<Preference>.Compare(Preference x, Preference y)
			{
				if (SorterMode == SorterMode.Ascending)
				{
					return y.ShopCode.CompareTo(x.ShopCode);
				}
				else
				{
					return x.ShopCode.CompareTo(y.ShopCode);
				}
			}
			#endregion
		}
		public class ShopNameComparer : System.Collections.Generic.IComparer<Preference>
		{
			public SorterMode SorterMode;
			public ShopNameComparer()
			{ }
			public ShopNameComparer(SorterMode SorterMode)
			{
				this.SorterMode = SorterMode;
			}
			#region IComparer<Preference> Membres
			int System.Collections.Generic.IComparer<Preference>.Compare(Preference x, Preference y)
			{
				if (SorterMode == SorterMode.Ascending)
				{
					return y.ShopName.CompareTo(x.ShopName);
				}
				else
				{
					return x.ShopName.CompareTo(y.ShopName);
				}
			}
			#endregion
		}
		public class AddressComparer : System.Collections.Generic.IComparer<Preference>
		{
			public SorterMode SorterMode;
			public AddressComparer()
			{ }
			public AddressComparer(SorterMode SorterMode)
			{
				this.SorterMode = SorterMode;
			}
			#region IComparer<Preference> Membres
			int System.Collections.Generic.IComparer<Preference>.Compare(Preference x, Preference y)
			{
				if (SorterMode == SorterMode.Ascending)
				{
					return y.Address.CompareTo(x.Address);
				}
				else
				{
					return x.Address.CompareTo(y.Address);
				}
			}
			#endregion
		}
		public class PhoneComparer : System.Collections.Generic.IComparer<Preference>
		{
			public SorterMode SorterMode;
			public PhoneComparer()
			{ }
			public PhoneComparer(SorterMode SorterMode)
			{
				this.SorterMode = SorterMode;
			}
			#region IComparer<Preference> Membres
			int System.Collections.Generic.IComparer<Preference>.Compare(Preference x, Preference y)
			{
				if (SorterMode == SorterMode.Ascending)
				{
					return y.Phone.CompareTo(x.Phone);
				}
				else
				{
					return x.Phone.CompareTo(y.Phone);
				}
			}
			#endregion
		}
		public class FaxComparer : System.Collections.Generic.IComparer<Preference>
		{
			public SorterMode SorterMode;
			public FaxComparer()
			{ }
			public FaxComparer(SorterMode SorterMode)
			{
				this.SorterMode = SorterMode;
			}
			#region IComparer<Preference> Membres
			int System.Collections.Generic.IComparer<Preference>.Compare(Preference x, Preference y)
			{
				if (SorterMode == SorterMode.Ascending)
				{
					return y.Fax.CompareTo(x.Fax);
				}
				else
				{
					return x.Fax.CompareTo(y.Fax);
				}
			}
			#endregion
		}
		public class EmailComparer : System.Collections.Generic.IComparer<Preference>
		{
			public SorterMode SorterMode;
			public EmailComparer()
			{ }
			public EmailComparer(SorterMode SorterMode)
			{
				this.SorterMode = SorterMode;
			}
			#region IComparer<Preference> Membres
			int System.Collections.Generic.IComparer<Preference>.Compare(Preference x, Preference y)
			{
				if (SorterMode == SorterMode.Ascending)
				{
					return y.Email.CompareTo(x.Email);
				}
				else
				{
					return x.Email.CompareTo(y.Email);
				}
			}
			#endregion
		}
		public class WebsiteComparer : System.Collections.Generic.IComparer<Preference>
		{
			public SorterMode SorterMode;
			public WebsiteComparer()
			{ }
			public WebsiteComparer(SorterMode SorterMode)
			{
				this.SorterMode = SorterMode;
			}
			#region IComparer<Preference> Membres
			int System.Collections.Generic.IComparer<Preference>.Compare(Preference x, Preference y)
			{
				if (SorterMode == SorterMode.Ascending)
				{
					return y.Website.CompareTo(x.Website);
				}
				else
				{
					return x.Website.CompareTo(y.Website);
				}
			}
			#endregion
		}
		public class RoundTypeInComparer : System.Collections.Generic.IComparer<Preference>
		{
			public SorterMode SorterMode;
			public RoundTypeInComparer()
			{ }
			public RoundTypeInComparer(SorterMode SorterMode)
			{
				this.SorterMode = SorterMode;
			}
			#region IComparer<Preference> Membres
			int System.Collections.Generic.IComparer<Preference>.Compare(Preference x, Preference y)
			{
				if (SorterMode == SorterMode.Ascending)
				{
					return y.RoundTypeIn.CompareTo(x.RoundTypeIn);
				}
				else
				{
					return x.RoundTypeIn.CompareTo(y.RoundTypeIn);
				}
			}
			#endregion
		}
		public class RoundTypeOutComparer : System.Collections.Generic.IComparer<Preference>
		{
			public SorterMode SorterMode;
			public RoundTypeOutComparer()
			{ }
			public RoundTypeOutComparer(SorterMode SorterMode)
			{
				this.SorterMode = SorterMode;
			}
			#region IComparer<Preference> Membres
			int System.Collections.Generic.IComparer<Preference>.Compare(Preference x, Preference y)
			{
				if (SorterMode == SorterMode.Ascending)
				{
					return y.RoundTypeOut.CompareTo(x.RoundTypeOut);
				}
				else
				{
					return x.RoundTypeOut.CompareTo(y.RoundTypeOut);
				}
			}
			#endregion
		}
	}
}
